import request from '@/config/axios'
const cancelPreviousRequest = true //开启阻止重复请求
export const statisticalCenterApi = {
  /**
   * 幼儿入园一览
   * @param {string} queryDate 查询日期,格式：yyyyMMdd
   * @returns
   */
  getStudentReport: async (queryDate: string) => {
    return await request.get({
      url: `/school/screen-display/student?queryDate=${queryDate}`,
      cancelPreviousRequest
    })
  },
  /**
   * 人力资源一览
   * @param {string} schoolCode 园区编码
   * @returns
   */
  getTeacherReport: async (schoolCode: string) => {
    return await request.get({
      url: `/school/screen-display/teacher?schoolCode=${schoolCode}`,
      cancelPreviousRequest
    })
  },
  /**
   * 儿童兴趣发展
   * @param {string} schoolCode 园区编码
   * @param {string} queryDate 查询日期
   * @param {string} classId 班级ID
   * @param {string} studentId 学生ID
   * @returns
   */
  getChildrenInterest: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/beacon-report`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 儿童心率周报表
   * @param {string} schoolCode 园区编码
   * @param {string} queryDate 查询日期,每周的周一
   * @param {string} classId 班级ID
   * @returns
   */
  getHeartRateWeekly: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/heart-rate-weekly`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 儿童健康检测报表
   * @param {string} schoolCode 园区编码
   * @param {string} queryDate 查询日期
   * @returns
   */
  getHealthReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/health-report`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 按班级统计儿童健康报表
   * @param {string} classId 班级ID
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getClassHealthReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/health-report/class`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 按个人统计儿童健康报表
   * @param {string} studentId 学生ID
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getStudentHealthReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/health-report/student`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 儿童睡眠报表
   * @param {string} schoolCode 园区编码
   * @param {string} queryDate 查询日期
   * @returns
   */
  getSleepReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/sleep-report`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 按班级统计儿童睡眠报表
   * @param {string} classId 班级ID
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getClassSleepReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/sleep-report/class`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 按个人统计儿童睡眠报表
   * @param {string} studentId 学生ID
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getStudentSleepReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/sleep-report/student`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 词汇分类分析
   * @param {string} studentId 学生编号
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getSpeechReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/speech-report`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 按园区统计儿童词汇分类分析
   * @param {string} schoolCode 园区编码
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getSchoolVocabularyReport: async (params: any) => {
    return await request.get({ url: `/school/screen-display/speech-report/school`, params })
  },
  /**
   * 按班级统计儿童词汇分类分析
   * @param {string} classId 班级ID
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getClassVocabularyReport: async (params: any) => {
    return await request.get({ url: `/school/screen-display/speech-report/class`, params })
  },
  /**
   * 口语表达分析
   * @param {string} studentId 学生编号
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getSpeechSpokenReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/speech-spoken`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 按园区统计儿童语言发展口语表达分析
   * @param {string} schoolCode 园区编码
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getSchoolSpeechSpokenReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/speech-spoken/school`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 按班级统计儿童语言发展口语表达分析
   * @param {string} classId 班级ID
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getClassSpeechSpokenReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/speech-spoken/class`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 实词虚词词频统计
   * @param {string} studentId 学生编号
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getWordsFreqReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/speech-freq`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 词性词频分析
   * @param {string} studentId 学生编号
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getPosWordFreqReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/speech-words`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 句子分析
   * @param {string} studentId 学生编号
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getSentsReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/speech-sents`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 按园区统计儿童句子分析
   * @param {string} schoolCode 园区编码
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getSchoolSentenceReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/speech-sents/school`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 按班级统计儿童句子分析
   * @param {string} classId 班级ID
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getClassSentenceReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/speech-sents/class`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 逻辑性及词性丰富度分析
   * @param {string} studentId 学生编号
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getLogicalReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/speech-logical`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 按园区统计逻辑性连词及词性丰富度分析
   * @param {string} schoolCode 园区编码
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getSchoolLogicalReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/speech-logical/school`,
      params,
      cancelPreviousRequest
    })
  },
  /**
   * 按班级统计逻辑性连词及词性丰富度分析
   * @param {string} classId 班级ID
   * @param {string} startTime 开始时间，格式：yyyyMMdd
   * @param {string} endTime 结束时间，格式：yyyyMMdd
   * @returns
   */
  getClassLogicalReport: async (params: any) => {
    return await request.get({
      url: `/school/screen-display/speech-logical/class`,
      params,
      cancelPreviousRequest
    })
  }
}
